Skip to content

Launcher: console filter and quick console navigation - #19

Merged
finger563 merged 8 commits into
mainfrom
feat/console-filter
Nov 14, 2026
Merged

finger563 merged 8 commits into
mainfrom
feat/console-filter

Conversation

@finger563

@finger563 finger563 commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #18: the console above the boxart is now interactive. The same feature is in esp-box-emu, along with the same remote_control.hpp and emulink.

  • Jump between consoles: Left / Right on the game list go to the previous / next console's first game. The game buttons are flagged LV_OBJ_FLAG_USER_1, so Tab5Emu::keypad_read() passes them Left / Right as keys instead of focus moves.
  • Filter to one console: tapping the console, X on a gamepad or F on a keyboard opens a console picker. It lists "All consoles" plus every console on the card with its number of games. A picks, and B or a tap beside the list closes it.
  • While filtered: the list shows only that console's games, the console is outlined, and Left / Right move the filter. Launching a game the filter hides shows all consoles again. The filter stays across games but not across a reboot.
  • Selected game: it is now highlighted in the list. The theme has no checked style for list buttons, so it wasn't before.
  • USB link (protocol 3): emulink filter <console|all>, the filter in status, and emulink screenshot of the launcher when no game runs.

Tested on the Tab5: picker by X / Down / A, Left / Right stepping, filters for all 6 consoles, a launch that lifts the filter, and the filter kept across a game.

Screenshots (emulink screenshot of the launcher)

All consoles (the selected game now highlighted) Console picker (X)
Filtered to GBA, then Right: Genesis only Super Nintendo only

The other consoles filtered (the badges are the firmware's own, since no console art is on the card):

Game Boy Advance PlayStation
PC PICO-8

🤖 Generated with Claude Code

https://claude.ai/code/session_01SFCMzomCZ5wRHJN4sxwkvY

- Left / right on the game list jump to the previous / next console (the
  game buttons take left / right as keys: LV_OBJ_FLAG_USER_1 in
  Tab5Emu::keypad_read()).
- The console above the boxart opens a console picker (tap it, X on a
  gamepad, F on a keyboard): all consoles, or only one console's games.
  The console is outlined while the list is filtered, and left / right
  then move the filter. Launching a game the filter hides lifts it.
- The selected game is highlighted in the list (the theme has no checked
  style for list buttons, so it was not).
- USB link (protocol 3, same remote_control.hpp / emulink as the box):
  CONSOLE_FILTER, the filter in STATUS, launcher screenshots.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SFCMzomCZ5wRHJN4sxwkvY
Copilot AI balanced review requested due to automatic review settings November 13, 2026 05:42

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The filter query can reset focus and overwrite a newer selection, while resuming with the console picker open routes controls to the obscured game list and prevents dismissing the picker.

2 open issues
What changed in this PR

Extends the grouped launcher introduced in #18 with console filtering and faster navigation, and exposes these features through the USB control link.

Changes:

  • Adds a console picker, left/right console navigation, and visible selection and filter indicators.
  • Introduces protocol 3 support for console filtering and launcher screenshots.
  • Adds emulink filter and documents the new launcher controls.
File Description
tools/​emulink/​emulink/​control.py Adds console-filter client support and updates screenshot documentation.
tools/​emulink/​emulink/​cli.py Adds the filter command and updates screenshot help.
README.md Documents console navigation, filtering, and USB usage.
main/​remote_control.hpp Implements protocol 3 filtering, filter status, and launcher screenshots.
components/​tab5-emu/​src/​tab5-emu.cpp Routes picker shortcuts and horizontal navigation keys.
components/​gui/​src/​gui.cpp Implements filtered lists, picker interactions, selection styling, and snapshots.
components/​gui/​include/​gui.hpp Declares filter and snapshot APIs and picker state.

Review effort: Balanced

Comment thread components/gui/src/gui.cpp Resolved
Comment on lines +207 to +210
if console is None:
console = self.status().get("filter", "")
# (an empty filter would clear it: ask for the same one again)
return self._call(CONSOLE_FILTER, (console or "all").encode())

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 7613e0d: CONSOLE_FILTER with ? is a read-only query (reports {filter, consoles} without touching the list), and emulink filter with no argument sends that instead of writing the current filter back.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow-up in 209cd4b: to match esp-box-emu (and its emulink), the query is now an empty CONSOLE_FILTER payload rather than ?; all clears the filter. Setting it also now runs on the main loop and is refused while a launch is pending.

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

ESP-IDF Size Report for 'Tab5 Emu'

Metric Base PR Delta
FLASH 0 bytes (0.00%) 0 bytes (0.00%) 0 bytes (0.00%)
DRAM 267,732 bytes (60.67%) 267,732 bytes (60.67%) 0 bytes (0.00%)
IRAM 0 bytes 0 bytes 0 bytes
RAM (DRAM+IRAM) 267,732 bytes 267,732 bytes 0 bytes (0.00%)

FLASH uses app .bin size or json2 flash sum. RAM sums DRAM+IRAM via idf_size. Percentages shown when totals are available.
DRAM/IRAM usage does not include memory used by the heap allocator at runtime.
This report was generated by esp-idf-size-delta.

finger563 and others added 4 commits November 13, 2026 09:00
esp_tinyusb 3.0.1 (TinyUSB 0.21.0~6, the DWC2 SETUP-DMA erratum
workaround) corrupts the PSRAM heap on esp-box-emu while a Genesis game
runs (the link task's next allocation hits a tlsf assert or an MMU entry
fault); 3.0.0 is fine. The Tab5 shares the USB device code, and a fresh
build resolves '>=3.0.0' to 3.0.1, so pin it here too.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SFCMzomCZ5wRHJN4sxwkvY
The heap corruption seen with Sonic 2 on the box turned out to be
intermittent: the same builds that failed also pass repeated trials, so
the runs that blamed esp_tinyusb 3.0.1 were not evidence of a cause. The
corruption is tracked separately; no pin until it is understood.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SFCMzomCZ5wRHJN4sxwkvY
…ter query

A game started from the PC (emulink launch) with the console picker open
left it on screen after the game while the keypad drove the list behind
it: resume() closes it. CONSOLE_FILTER takes "?" as a query that changes
nothing, and emulink filter with no argument uses it instead of writing
the current filter back.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SFCMzomCZ5wRHJN4sxwkvY
@finger563
finger563 requested a balanced review from Copilot November 14, 2026 03:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

5 open issues

Review effort: Lite

Comment thread components/gui/src/gui.cpp Resolved
Comment thread components/gui/src/gui.cpp Resolved
Comment thread tools/emulink/emulink/cli.py Resolved
…on indices; tolerant emulink filter output

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SFCMzomCZ5wRHJN4sxwkvY

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

finger563 and others added 2 commits November 13, 2026 22:18
…is pending; a list reload closes the picker

As esp-box-emu (3f9a022, 2968e88), so the protocol and emulink match:
- CONSOLE_FILTER with an empty payload returns {filter, consoles}
  without touching the launcher ("all" clears the filter); emulink
  filter with no console sends that query.
- Setting it runs on the main loop under the GUI lock, like LAUNCH, and
  is refused while a launch the loop has taken has not started its cart.
- Re-reading metadata.csv closes an open console picker.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SFCMzomCZ5wRHJN4sxwkvY
…larifyCondition)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SFCMzomCZ5wRHJN4sxwkvY
@finger563
finger563 merged commit c444f7b into main Nov 14, 2026
1 check passed
@finger563
finger563 deleted the feat/console-filter branch November 14, 2026 06:06
finger563 added a commit that referenced this pull request Nov 14, 2026
main's tree is feat/console-filter's tip (b994815), already merged here, so
this branch's tree is kept as is.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SFCMzomCZ5wRHJN4sxwkvY
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants